import type PageContent from '@/components/page-content/page-content.vue'
import { ref } from 'vue'

function usePageHeader() {
  const pageContentRef = ref<InstanceType<typeof PageContent>>()

  // 1.点击搜索按钮
  const searchClick = (formData: any) => {
    // @ts-ignore
    pageContentRef.value?.getPageData(formData)
  }
  // 2.点击重置按钮
  const resetClick = () => {
    // @ts-ignore
    pageContentRef.value?.getPageData()
  }

  return { pageContentRef, searchClick, resetClick }
}

export default usePageHeader
